package com.kjjt.entity;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class UserDemo {
    @NotBlank
    private String username;
    @NotBlank
    private String password;
    @NotBlank
    private String phone;
    @NotBlank
    private String realName;
    @NotBlank
    private String idCard;

    @Min(value = 18, message = "年龄太小了")
    @Max(value = 60, message = "年龄太大了")
    @NotNull(message = "年龄不能为空")
    private Integer age;
}
